import { createRouter, createWebHistory } from 'vue-router'

import Login from '../views/login/index.vue'
import TabBar from '@/components/TabBar.vue'
const routes = [{
        path: '/',
        name: 'login',
        components: {
            default: Login,
            footer: TabBar,
        }

    },
    {
        path: '/user',
        name: 'user',

        components: {
            default: () =>
                import ('../views/user/index.vue'),
            footer: TabBar

        }
    },
    {
        path: '/register',
        name: 'register',

        components: {
            default: () =>
                import ('../views/register/index.vue'),
            footer: TabBar

        }
    },
]


const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router